import React from "react";
import { Image, StyleSheet, TouchableOpacity, View ,Text} from "react-native";

export default ({upText,downText,itemHeight,itemWidth,onPress}) => {

    console.log(`itemHeight=${itemHeight},itemWidth=${itemWidth}`);

    return (
        <TouchableOpacity onPress={onPress}>
            <View style={[styles.root,{height:itemHeight,width:itemWidth}]}>
                <Text style={[styles.upTextStyele,]}>{`${upText}`}</Text>
                <Text style={styles.downTextStyele}>{`${downText}`}</Text>
            </View>
        </TouchableOpacity>
    );
}

const styles = StyleSheet.create({
    root:{
        // display:'flex',
        // flexDirection:'column',
        // backgroundColor:'red',
        justifyContent: 'center',
        alignItems:'center', 
        paddingHorizontal:1,
        
    },
    upTextStyele:{
        height:20,
        fontSize:15,
        color:'white',
        alignItems:'center',
        // backgroundColor:'yellow'

    },downTextStyele:{
        marginTop:5,
        fontSize:14,
        alignItems:'center',
        color:'#FFFFFF',
    }
});